let aptColor = [{
	text: "monitor.Excellent",
	color: "#01E501"
}, {
	text: "monitor.VeryMuch",
	color: "#FEE301"
}, {
	text: "monitor.LightPollution",
	color: "#FF7E01"
}, {
	text: "monitor.ModeratePollution",
	color: "#FF0101"
}, {
	text: "monitor.HeavyPollution",
	color: "#980148"
}, {
	text: "monitor.SeriousContamination",
	color: "#810127"
}];

function aptSwitch(value)
{
	let flag = -1;
	if (value <= 50 && value >= 0) {
		flag = 0;
	} else if (value <= 100) {
		flag = 1;
	} else if (value <= 150) {
		flag = 2;
	} else if (value <= 200) {
		flag = 3;
	} else if (value <= 300) {
		flag = 4;
	} else {
		flag = 5;
	}
	
	return aptColor[flag];
}

export{
	aptSwitch,
};